|
![](/i/fill.gif) |
In case anyone's interested, here's a handy woven cloth texture. To add color,
you can add another texture to the averaged texture_map near the end. I hope
someone finds this usefull!
Regards,
Dave Blandston
* * * * * * * * * * * * * * * * * * * * * * * *
#local ClothScale = .5;
#local ThreadWidth = .2;
#local EdgeWidth = .08;
#declare Cloth = texture {
pigment {
gradient x
color_map {
[0 color Black]
[.1 color Black]
[.5 color White * 4]
[.9 color Black]
[1 color Black]
} //color_map
} //pigment
} //texture
texture {
pigment {
gradient y
color_map {
[0 color Black]
[.5 - ThreadWidth / 2 - EdgeWidth color Black]
[.5 - ThreadWidth / 2 color Black transmit 1]
[.5 + ThreadWidth / 2 color Black transmit 1]
[.5 + ThreadWidth / 2 + EdgeWidth color Black]
[1 color Black]
} //color_map
} //pigment
} //texture
#declare Cloth = texture {
average
texture_map {
[1 Cloth]
[1 Cloth translate <.5, .5, 0>]
[1 Cloth rotate 90 * z translate <.5, 0, 0>]
[1 Cloth rotate 90 * z translate <0, .5, 0>]
//[1 MyTexture]
} //texture_map
scale <ClothScale, ClothScale, 1>
} //texture
Post a reply to this message
Attachments:
Download 'temp.png' (50 KB)
Preview of image 'temp.png'
![temp.png](/povray.binaries.images/attachment/%3Cweb.4b72093ee292c410cba3fb0f0%40news.povray.org%3E/temp.png?preview=1)
|
![](/i/fill.gif) |